package com.yystar.security.support.jdbc;

/**
 * 
 * @author Vistaa Peng
 * @date 2013-6-27
 * @todo TODO
 * @modify	<BR>
 * 1.2013-6-27 Vistaa Peng Create file.
 */
public class Where {
	private String relation = "AND";//query relation(AND/OR)
	private String name;//query field name
	private String bind = "=";//query bind(LIKE/=/</>)
	/**
	 * query value<BR>
	 * If bind is 'LIKE', then this value must like this(no single quotes): test1234% or %test1234% or %test1234<BR>
	 * else will query nothing
	 */
	private Object value;
	
	public Where() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public Where(String relation, String name, String bind, Object value) {
		super();
		this.relation = relation;
		this.name = name;
		this.bind = bind;
		this.value = value;
	}
	
	public Where(String name, String bind, Object value) {
		super();
		this.name = name;
		this.bind = bind;
		this.value = value;
	}
	
	public Where(String name, Object value) {
		super();
		this.name = name;
		this.value = value;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getBind() {
		return bind;
	}
	public void setBind(String bind) {
		this.bind = bind;
	}
	public Object getValue() {
		return value;
	}
	public void setValue(Object value) {
		this.value = value;
	}

	public String getRelation() {
		return relation;
	}
	public void setRelation(String relation) {
		this.relation = relation;
	}
}
